package org.activequant.util.store;

import java.io.Serializable;

import org.activequant.store.IStoreService;
import org.apache.log4j.Logger;

/**
 * Mock store service.<br/>
 * MockStore implements IStoreService. Doesn't store or save anything.
 * <p>
 * <b>History:</b><br>
 *  - [16.01.2008] Created (Erik Nijkamp)<br>
 *
 *  @author Erik Nijkamp
 */
public class MockStore implements IStoreService {
	
	private final static Logger log = Logger.getLogger(MockStore.class);
	
	/**
	 * Logs "Mock loading '${name}'" and then returns null
	 */
	public Serializable load(String name) throws Exception {
		log.info("Mock loading '"+name+"'");
		return null;
	}
	/**
	 * Logs "Mock saving '${name}'"
	 */
	public void save(String name, Serializable object) throws Exception {
		log.info("Mock saving '"+name+"'");
	}
}
